<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="app"></div>
</body>
<script>
    const app = Vue.createApp({
        data(){
            return{
                message: '好消息',
                xiemessage: '<i>好消息</i>'
            }
        },
        methods:{
            handclick(){
                this.message = this.message=='好消息'?'坏消息':'好消息'
            }
        },
        template:`<h2 v-on:click="handclick" v-once>{{message}}</h2>
        <h2 v-html="xiemessage" v-bind:title="message"></h2>
        <div>{{5>2?'5>2':'5<2'}}</div>
        `
    })
    app.mount("#app")
</script>
</html>